package com.eelye.util.exception;

/**
 * 带错误码的异常
 */
public class CodedException extends Exception {

    public interface IErrorCode {
        int getCode();
    }
	
	private static final long serialVersionUID = -1951956207156641841L;
	
	int m_errcode = 0;

    public CodedException(String msg , IErrorCode errcode){
        super(msg);

        m_errcode = errcode.getCode();
    }

    public int getCode(){
        return m_errcode;
    }
}
